<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
 * Copyright (C) 2003-2010 Frederico Caldeira Knabben
 *
 * == BEGIN LICENSE ==
 *
 * Licensed under the terms of any of the following licenses at your
 * choice:
 *
 *  - GNU General Public License Version 2 or later (the "GPL")
 *    http://www.gnu.org/licenses/gpl.html
 *
 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
 *    http://www.gnu.org/licenses/lgpl.html
 *
 *  - Mozilla Public License Version 1.1 or later (the "MPL")
 *    http://www.mozilla.org/MPL/MPL-1.1.html
 *
 * == END LICENSE ==
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>FCKDomTools.InsertAfterNode</title>
	<script src="../../../editor/_source/fckscriptloader.js" type="text/javascript"></script>
	<script src="../_common/manual_test.js" type="text/javascript"></script>
	<script type="text/javascript">

FCKScriptLoader.Load( 'FCKTools' ) ;
FCKScriptLoader.Load( 'FCKDomTools' ) ;

	</script>
	<script type="text/javascript">

FCKTools.RegisterDollarFunction( window ) ;

window.onload = function()
{
	var eDiv = document.createElement( 'div' ) ;
	eDiv.innerHTML = 'Element 1' ;
	FCKDomTools.InsertAfterNode( $('xA'), eDiv ) ;

	eDiv = document.createElement( 'div' ) ;
	eDiv.innerHTML = 'Element 2' ;
	FCKDomTools.InsertAfterNode( $('xB'), eDiv ) ;

	eDiv = document.createElement( 'div' ) ;
	eDiv.innerHTML = 'Element 3' ;
	FCKDomTools.InsertAfterNode( $('xC'), eDiv ) ;
}
	</script>
</head>
<body>
	<h1>
		FCKDomTools.InsertAfterNode</h1>
	<table border="1" align="center" cellpadding="5">
		<tr>
			<td width="50%">
				Test Result
			</td>
			<td width="50%">
				Expected Result
			</td>
		</tr>
		<tr>
			<td><div id="xA">Element A</div><div id="xB">Element B</div><div id="xC">Element C</div></td>
			<td>
				<div>
					Element A</div>
				<div>
					Element 1</div>
				<div>
					Element B</div>
				<div>
					Element 2</div>
				<div>
					Element C</div>
				<div>
					Element 3</div>
			</td>
		</tr>
	</table>
</body>
</html>
